home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat3 / Tcl / tclObjSrv.z / tclObjSrv
Encoding:
Text File  |  1998-10-30  |  12.7 KB  |  331 lines

  1.  
  2.  
  3.  
  4. ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))                                                ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      tclObjSrv - Tcl-library interface to the object server
  10.  
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      lllliiiibbbbttttccccllllOOOObbbbjjjjSSSSrrrrvvvv....ssssoooo
  14.  
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _l_i_b_t_c_l_O_b_j_S_r_v._s_o is a Tcl shared library with extensions for accessing the
  18.      object server.  It supports the ggggeeeetttt, sssseeeetttt, ccccrrrreeeeaaaatttteeee, rrrreeeemmmmoooovvvveeee, vvvveeeerrrriiiiffffyyyy, sssseeeeaaaarrrrcccchhhh
  19.      and DDDDSSSSsssseeeeaaaarrrrcccchhhh operations, as well as an iiiinnnnffffoooo pseudo-op that returns
  20.      information about the database.
  21.  
  22.      For each object class there is a command defined; the command name is the
  23.      class name prefixed by a dot (.) character.  The first parameter to the
  24.      object commands is an option, one of:  ggggeeeetttt, sssseeeetttt, ccccrrrreeeeaaaatttteeee, rrrreeeemmmmoooovvvveeee, vvvveeeerrrriiiiffffyyyy,
  25.      sssseeeeaaaarrrrcccchhhh, DDDDSSSSsssseeeeaaaarrrrcccchhhh, or iiiinnnnffffoooo.  For example, the following command
  26.  
  27.           sgitcl>.hostObject info
  28.  
  29.      will execute the iiiinnnnffffoooo option for the hhhhoooossssttttOOOObbbbjjjjeeeecccctttt class.  The object name
  30.      may be abbreviated to the least unambiguous string.  The options are
  31.      described in detail below.
  32.  
  33.  
  34. OOOOppppeeeennnniiiinnnngggg tttthhhheeee lllliiiibbbbrrrraaaarrrryyyy
  35.      To open the library, execute the following command from within sgitcl:
  36.  
  37.           sgitcl>dlopen libtclObjSrv.so init ObjSrv_Init
  38.  
  39.      The target server will default to the login host.  The IP address of the
  40.      target is available in the Tcl variable "_objAddr".  To change targets,
  41.      set this variable to the IP address of the desired server.  For example,
  42.  
  43.           sgitcl> set _objAddr 192.26.75.54
  44.           192.26.75.54
  45.  
  46.      will target object operations at the specified machine (the set command
  47.      will print the new value of the variable).  There is also a command
  48.      called _g_e_t_h_o_s_t_b_y_n_a_m_e that will do an IP lookup on a server name; so the
  49.      above command could be executed as:
  50.  
  51.           sgitcl> set _objAddr [gethostbyname alpine]
  52.           192.26.75.54
  53.  
  54.      The brackets tell Tcl to execute the contents as a separate command and
  55.      substitute the result string for the bracketed text.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))                                                ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
  71.  
  72.  
  73.  
  74. CCCCoooommmmmmmmaaaannnndddd SSSSyyyynnnnttttaaaaxxxx
  75.      sgitcl>._o_b_j_e_c_t_N_a_m_e ggggeeeetttt _o_i_d _a_t_t_r_i_b_u_t_e_s
  76.  
  77.           The ggggeeeetttt option retrieves attributes of an object instance, specified
  78.           by _o_i_d.  The _a_t_t_r_i_b_u_t_e_s to be retrieved are defined by a list of
  79.           aid's; attribute names may also be used (derived attributes are
  80.           recognized).  The list must be enclosed in quotes "" or braces {} if
  81.           it contains more than one element.  The returned string will contain
  82.           the values formatted as a list in the order specified on the
  83.           command.
  84.  
  85.           EEEExxxxaaaammmmpppplllleeee:
  86.  
  87.           sgitcl> .hostObject get 59.201.1762020729.1 {59.201.1 owner}
  88.           alpine rj
  89.  
  90.      sgitcl>._o_b_j_e_c_t_N_a_m_e sssseeeetttt _o_i_d _a_i_d-_v_a_l_u_e-_l_i_s_t
  91.  
  92.           The sssseeeetttt option sets the values of attributes of an object instance,
  93.           specified by _o_i_d .  The _a_i_d-_v_a_l_u_e-_l_i_s_t parameter is a list of
  94.           aid/value pairs defining the attributes to be set.  The return value
  95.           is an empty string.
  96.  
  97.           EEEExxxxaaaammmmpppplllleeee:
  98.  
  99.           sgitcl>.hostObject set 59.201.1762020729.1 {owner Beavis}
  100.           sgitcl>.hostObject get 59.201.1762020729.1 {owner}
  101.           Beavis
  102.  
  103.      sgitcl>._o_b_j_e_c_t_N_a_m_e ccccrrrreeeeaaaatttteeee _a_i_d-_v_a_l_u_e-_l_i_s_t
  104.  
  105.           The ccccrrrreeeeaaaatttteeee option makes a new instance of the class.  The _a_i_d-
  106.           _v_a_l_u_e-_l_i_s_t is a list of aid/value pairs defining the attributes of
  107.           the object; any requiredOnCreate attributes must be defined.  The
  108.           return value is the _o_i_d of the new instance.
  109.  
  110.           EEEExxxxaaaammmmpppplllleeee:
  111.  
  112.           sgitcl>set beavisOID [.peopleNISObject create \
  113.           =>        {loginName beavis jobTitle "MTV flunky"}]
  114.           sgitcl>.peopleNISObject get $beavisOID jobTitle
  115.           MTV flunky
  116.  
  117.           Note the use of Tcl's sssseeeetttt command to store the returned _o_i_d in a
  118.           variable, which can then be used to perform further operations on
  119.           the new object.
  120.  
  121.      sgitcl>._o_b_j_e_c_t_N_a_m_e rrrreeeemmmmoooovvvveeee _o_i_d
  122.  
  123.           The rrrreeeemmmmoooovvvveeee option destroys an instance of the class, specified by
  124.           _o_i_d.  The return value is an empty string.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))                                                ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
  137.  
  138.  
  139.  
  140.           EEEExxxxaaaammmmpppplllleeee:
  141.  
  142.           sgitcl>.peopleNISObject remove $beavisOID
  143.           sgitcl>.peopleNISObject get $beavisOID loginName
  144.           query error (1)
  145.  
  146.           Note that after the object is removed, an attempt to access that
  147.           object results in LEGO error 1 (LLLLEEEEGGGGOOOO____EEEERRRRRRRR____NNNNooooSSSSuuuucccchhhhNNNNaaaammmmeeee).
  148.  
  149.      sgitcl>._o_b_j_e_c_t_N_a_m_e vvvveeeerrrriiiiffffyyyy
  150.  
  151.           Performs the vvvveeeerrrriiiiffffyyyy operation on the target server.  Returns an
  152.           empty string.  In this case, the object name is not significant
  153.           (i.e. any class may be used).
  154.  
  155.           EEEExxxxaaaammmmpppplllleeee:
  156.  
  157.           sgitcl>.host verify
  158.  
  159.      sgitcl>._o_b_j_e_c_t_N_a_m_e sssseeeeaaaarrrrcccchhhh _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t
  160.  
  161.           Performs a sssseeeeaaaarrrrcccchhhh on the target server.  The _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t is a
  162.           list of attribute/value comparisons defining the filter to be
  163.           applied to the object database.  Each comparison consists of an _a_i_d
  164.           (or attribute name), a comparison operator, and a value.  The return
  165.           value is a list of matching _o_i_d's.
  166.  
  167.           EEEExxxxaaaammmmpppplllleeee:
  168.  
  169.           sgitcl>.host search {systemName=alpine owner = rj}
  170.           59.201.1762020729.1
  171.  
  172.           Note that spaces are optional around the operator; if the value
  173.           string is a list, or contains embedded whitespace, it must be
  174.           enclosed in quotes or braces, and must be preceded by a space
  175.           (before the open quote or brace).  The comparison operators are
  176.           defined as for C/C++:
  177.  
  178.                =    exactly equal
  179.                !=   not equal
  180.                >=   greater than or equal
  181.                <=   less than or equal
  182.                >    strictly greater
  183.                <    strictly less
  184.  
  185.           Integer values are translated in hex if preceded by 0x, and in octal
  186.           if a leading zero (i.e. C style translation).  Boolean values may be
  187.           specified as "true" or "false".  An attribute of type legoTypeTime
  188.           is translated using the getdate() routine.  Strings with embedded
  189.           spaces must be enclosed in quotes or braces.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))                                                ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
  203.  
  204.  
  205.  
  206.           The "matches any" operator is not defined; simply leaving the
  207.           attribute out of the filter will achieve the same effect.
  208.  
  209.      sgitcl>._o_b_j_e_c_t_N_a_m_e DDDDSSSSsssseeeeaaaarrrrcccchhhh _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t _i_m_p_o_r_t_a_n_t-_a_t_t_r_s [----aaaannnnyyyy]
  210.  
  211.           Performs a Directory Server search.  The _a_t_t_r-_v_a_l_u_e-_o_p-_l_i_s_t is as
  212.           for sssseeeeaaaarrrrcccchhhh.  The _i_m_p_o_r_t_a_n_t-_a_t_t_r_s argument is a list of
  213.           aid's/attribute names to be returned.  The optional switch -aaaannnnyyyy
  214.           indicates that any server may respond; if omitted, then the search
  215.           is directed at the current target server.  The return value is a
  216.           list of oid/attribute-list pairs, one for each matching object
  217.           found.  After this command returns, the global variable
  218.           "_objResponder" will contain the IP address of the server that
  219.           responded.
  220.  
  221.           EEEExxxxaaaammmmpppplllleeee:
  222.  
  223.           sgitcl>set _objResponder
  224.           can't read "_objResponder": no such variable
  225.           sgitcl>.host DSsearch {systemName=alpine} {numCPUs memSize} -any
  226.           59.201.1762020729.1 {1 41943040}
  227.           sgitcl>set _objResponder
  228.           192.26.75.11
  229.  
  230.      sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo [_o_p_t_i_o_n [args]]
  231.  
  232.           Provides information about the object database.  With no ooooppppttttiiiioooonnnn
  233.           parameter, the info command will return the complete description of
  234.           the object as it appears in the *.op file used to initialize the
  235.           database.  The other options are described below:
  236.  
  237.      sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo aaaannnnaaaammmmeeeessss
  238.  
  239.           Returns a list of the attribute names defined for the object;
  240.           derived attributes are NOT included.
  241.  
  242.      sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo ooooiiiidddd
  243.  
  244.           Returns the class oid (with the system and instance fields set to
  245.           zero).
  246.  
  247.      sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo aaaaiiiidddd _a_t_t_r-_n_a_m_e
  248.  
  249.           Returns the aid of the named attribute.
  250.  
  251.      sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo aaaattttttttrrrr _a_t_t_r-_n_a_m_e
  252.  
  253.           Returns the text description of an attribute as it appears in the
  254.           *.op file.
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))                                                ttttccccllllOOOObbbbjjjjSSSSrrrrvvvv((((3333TTTTccccllll))))
  269.  
  270.  
  271.  
  272.      sgitcl>._o_b_j_e_c_t_N_a_m_e iiiinnnnffffoooo ppppaaaarrrreeeennnntttt
  273.  
  274.           Returns the name of the base class.  For the bbbbaaaasssseeeeOOOObbbbjjjjeeeecccctttt class, the
  275.           returned value is an empty string.
  276.  
  277. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  278.      Tcl(3Tcl)
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.